package com.starlink.model.util;

import com.starlink.model.dtomapper.MallPaymentDtoMapper;
import com.starlink.model.domain.MallPaymentDO;
import com.starlink.model.vo.MallPaymentVO;
import com.google.common.collect.Lists;
import org.apache.commons.collections4.CollectionUtils;

import java.util.ArrayList;
import java.util.List;

/**
 * @author zhanghong
 */
public class MallPaymentConvert {

    public static List<MallPaymentVO> buildMallPaymentVoList(List<MallPaymentDO> mallPaymentDOList) {
        if (CollectionUtils.isEmpty(mallPaymentDOList)) {
            return Lists.newArrayList();
        }
        List<MallPaymentVO> mallPaymentVOList = new ArrayList<>();
        for (MallPaymentDO mallPaymentDO : mallPaymentDOList) {
            mallPaymentVOList.add(MallPaymentDtoMapper.INSTANCE.do2VO(mallPaymentDO));
        }

        return mallPaymentVOList;
    }
}
